<div class="qgy-nav-bar">
  <div class="pc-width nav-container pc-padding clearfix">
    <div class="nav-logo ">
      <a [routerLink]="['/']">
        <img src="assets/images/index_logo.png" alt="">
        <!--<p class="msg font_14">生活就该是这样</p>-->
      </a>

    </div>
    <div class="nav-city" (click)="switchCity()">
      <i></i>
      <span class="font_16">{{city.name}}</span>
    </div>
    <div class="nav-list">
      <a *ngFor="let i of navLists"
         routerLinkActive="active"
         [routerLinkActiveOptions]="{exact:true}"
         [routerLink]="i.link">
        <span class="font_16">{{i.title}}</span>
      </a>
    </div>
    <div class="nav-login fr">
        <a href="javascript:;" class="icon" (mouseover)="showQrCode()" (mouseleave)="closeQrCode()">
          <img src="assets/images/index_wechat.png" alt="">
        </a>
        <div class="qr-code" *ngIf="isShowQrCode"></div>
        <span class="login" *ngIf="user == undefined|| user && !user.token || user== null">
          <a href="javascript:;" (click)="showModal('login')">登录</a>
          <span>|&nbsp;</span>
          <a href="javascript:;" (click)="showModal('register')">注册</a>
        </span>
        <span class="logining" *ngIf="user && user.token">
          <a [routerLink]="['personal']">
            <img [src]="user.portrait" alt="">
          </a>
          <!--<a data-toggle="modal" data-target="#layer">退出</a>-->
          <a (click)="logout()">退出</a>
        </span>
    </div>

    <!--退出确认弹出框 层级问题，再请教albert-->
    <!--<div role="dialog" class="modal fade" id="layer">-->
      <!--<div class="modal-dialog">-->
        <!--<div class="modal-content">-->
          <!--<div class="modal-header">-->
            <!--<h4 class="modal-title">确定退出么？</h4>-->
          <!--</div>-->
          <!--<div class="modal-body text-right">-->
            <!--<button class="btn btn-primary btn-sm" data-dismiss="modal">取消</button>-->
            <!--<button data-dismiss="modal" class="btn btn-danger btn-sm" (click)="logout()">确认</button>-->
          <!--</div>-->
        <!--</div>-->
      <!--</div>-->
    <!--</div>-->
  </div>
</div>
<login-modal-view [showModal]="showLoginModal" [modalContent]="modalContent" (modalClose)="closeLogin($event)"></login-modal-view>
